<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    /* 偷懒样式重置 */
  /* 偷懒样式重置 */
  /* 偷懒样式重置 */
  html * { margin: 0; padding: 0; }
  html,
  body { width: 100%; height: 100%; }
  .layout { width: 100%; height: 100%; display: table; flex-direction: column; }
  .layout .header,
  .layout .footer { display: table-row; height: 100px; width: 100%; background-color: #ddd; }
  .layout .content { display: table-row; background-color: #999; }
  </style>
</head>
<body>
  <section class="layout">
    <header class="header">头部</header>
    <article class="content">
      <p>中间部分 高度自适应</p>
      <p>中间部分 高度自适应</p>
      
    </article>
    <footer class="footer">底部</footer>
  </section>
</body>
</html>